import request from '@/utils/request';

// 查询定时任务列表
export const taskList = (data) => {
  return request({
    url: 'console/quartz/list',
    method: 'POST',
    data,
  })
}
// 获取定时任务详细信息
export const taskListDetails = (data) => {
  return request({
    url: 'console/quartz/getInfo',
    method: 'POST',
    data,
  })
}
// 新增定时任务
export const taskAdd = (data) => {
  return request({
    url: 'console/quartz/addQuartz',
    method: 'POST',
    data,
  })
}
// 定时任务状态修改
export const taskChangeStatus = (data) => {
  return request({
    url: 'console/quartz/changeStatus',
    method: 'POST',
    data,
  })
}
// 删除定时任务
export const taskDelete = (data) => {
  return request({
    url: 'console/quartz/removeQuartz',
    method: 'POST',
    data,
  })
}
// 定时任务立即执行一次
export const taskRun = (data) => {
  return request({
    url: 'console/quartz/run',
    method: 'POST',
    data,
  })
}
// 修改定时任务
export const taskUpdate = (data) => {
  return request({
    url: 'console/quartz/updateQuartz',
    method: 'POST',
    data,
  })
}